<?php

namespace Home\Controller;

class RedirectController extends HomeController
{
    public function index($url = null) {
        // 检查登陆
        if ( !($uid = check_login($this)) ){
//            dump(base64_encode('http://vote.huiyouzan.com/Vote/activity/id/8'));
//            dump(base64_decode($url));

            //$this->display('Public/need_wechat');
        } else {
            redirect(base64_decode($url));
        }
    }

    public function clear(){
        session(null);
    }
}
